﻿
@{
    ViewBag.Title = "Index";
    var co = ViewBag.Courses as List<WebApplication3.Models.Course>;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="wwdth=device-wdth" />
    <title></title>
    <style>
        td{
            border:1px solid #00ffff;
        }
    </style>
</head>

<body>
    
    <div>
        <table>
            <thead>
                <tr>
                    <th>课程编号</th>
                    <th>课程名称</th>
                    <th>学分</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in co)
                {
                    <tr>
                        <td>@item.CourseID</td>
                        <td>@item.Title</td>
                    <td>@item.Credits</td>
                    </tr>

                }
            </tbody>
        </table>
    </div>
</body>
</html>
